import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect:"/login",
    },
    {
      path: '/login',
      component: () => import('../views/LoginView.vue'),
    },
    {
      path: '/homepage',
      component: () => import('../views/HomePage.vue'),
      redirect:"/homepage/home",
      children:[
        {
          path:'/homepage/home',
          component: () => import('../components/Home/Home.vue'),
        },
        {
          path:'/homepage/user',
          component: () => import('../views/manage/UserView.vue'),
        },
        {
          path:'/homepage/article',
          component: () => import('../views/manage/article/ArticleView.vue'),
        },
        {
          path:'/homepage/articleType',
          component: () => import('../views/manage/article/ArticleTypeView.vue'),
        },
        {
          path:'/homepage/consult',
          component: () => import('../views/manage/consult/consultView.vue'),
        },
        {
          path:'/homepage/consultSpecialty',
          component: () => import('../views/manage/consult/ConsultSpecialty.vue'),
        },
        {
          path:'/homepage/consultDiploma',
          component: () => import('../views/manage/consult/ConsultDiploma.vue'),
        },
        {
          path:'/homepage/charge',
          component: () => import('../views/manage/consult/Charge.vue'),
        },
        {
          path:'/homepage/courseMark',
          component: () => import('../views/manage/course/CourseMark.vue'),
        },
        {
          path:'/homepage/coursecollection',
          component: () => import('../views/manage/course/Coursecollection.vue'),
        },
        {
          path:'/homepage/courseReply',
          component: () => import('../views/manage/course/CourseReply.vue'),
        },
        {
          path:'/homepage/courseTalk',
          component: () => import('../views/manage/course/CourseTalk.vue'),
        },
        {
          path:'/homepage/course',
          component: () => import('../views/manage/course/kcbiao.vue'),
        },
        {
          path:'/homepage/coursePurchase',
          component: () => import('../views/manage/course/CoursePurchase.vue'),
        },
        {
          path:'/homepage/courseLei',
          component: () => import('../views/manage/course/CourseLei.vue'),
        },
        {
          path:'/homepage/CA',
          component: () => import('../views/cae/CA.vue'),
        },
        {
          path:'/homepage/UserP',
          component: () => import('../views/cae/UserP.vue'),
        },
        {
          path:'/homepage/PM',
          component: () => import('../views/cae/PM.vue'),
        },
        {
          path:'/homepage/reply',
          component: () => import('../views/cae/Reply.vue'),
        },
        {
          path:'/homepage/myTest',
          component: () => import('../views/cae/MyTest.vue'),
        },
        {
          path:'/homepage/free',
          component: () => import('../views/other/Free.vue'),
        },
        {
          path:'/homepage/fm',
          component: () => import('../views/other/FM.vue'),
        },
        {
          path:'/homepage/heartKnowledge',
          component: () => import('../views/other/HeartKnowledge.vue'),
        },
        {
          path:'/homepage/company',
          component: () => import('../views/other/Company.vue'),
        },
        {
          path:'/homepage/publicity',
          component: () => import('../views/other/Publicity.vue'),
        },
        {
          path:'/homepage/myNotice',
          component: () => import('../views/other/MyNotice.vue'),
        },
        {
          path:'/homepage/profile',
          component: () => import('../components/Individual/Profile.vue'),
        }

      ]
    }
  ],
})

export default router
